<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <head>
    </head>
    <body>
        <ui:composition template="/templates/default.xhtml">
			<ui:define name="title">OpenHDS - Create Study Document</ui:define>
		
			<ui:param name="hideTabBar" value="true" />
        
           <ui:define name="display">
           
           		<h:outputText value="#{navController.breadcrumbTrail} > StudyDocument Create" />
           
                <h1>#{msg.ddiCreate}</h1>
                
                <b>#{msg.ddiModule}</b>
                <br /><br />

                <h:messages id="errors" globalOnly="true" />
                <h:form id="form">
                    <h:panelGrid columns="3">

                        <h:outputText value="#{msg.ddiStudyName}:"/>
                        <h:inputText id="studyName" value="#{studyDocBean.studyName}" converter="#{defaultConverter}" required="true"/>
                        <h:message for="studyName" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

                        <h:outputText value="#{msg.ddiStudyId}:"/>
                       	<h:inputText id="studyId" value="#{studyDocBean.studyId}" converter="#{defaultConverter}" required="true"/>
                        <h:message for="studyId" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

                        <h:outputText value="#{msg.ddiStudyStartDate}:"/>
                        <h:inputText id="studyStartDate" value="#{studyDocBean.studyStartDate}" styleClass="date demo_jqui" converter="#{defaultConverter}" required="true"/>
                        <h:message for="studyStartDate" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

						<h:outputText value="#{msg.ddiStudyEndDate}:"/>
                        <h:inputText id="studyEndDate" value="#{studyDocBean.studyEndDate}" styleClass="date demo_jqui" converter="#{defaultConverter}" required="true"/>
                        <h:message for="studyEndDate" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>
						
						<h:outputText value="#{msg.ddiAffiliation}:"/>
                        <h:inputText id="affiliation" value="#{studyDocBean.affiliation}" converter="#{defaultConverter}" required="true"/>
                        <h:message for="affiliation" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

                        <h:outputText value="#{msg.ddiAuthor}:"/>
                       	<h:inputText id="author" value="#{studyDocBean.author}" converter="#{defaultConverter}" required="true"/>
                        <h:message for="author" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>
						
						<h:outputText value="#{msg.ddiEmail}:"/>
                       	<h:inputText id="email" value="#{studyDocBean.email}" converter="#{defaultConverter}" required="true"/>
                        <h:message for="email" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

                        <h:outputText value="#{msg.ddiNationAbbrv}:"/>
                       	<h:inputText id="nation" value="#{studyDocBean.nationAbrv}" converter="#{defaultConverter}" required="true"/>
                        <h:message for="nation" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

						<h:outputText value="#{msg.ddiNotes}:"/>
						<h:inputTextarea id="notes" value="#{studyDocBean.notes}" rows="5" cols="15" converter="#{defaultConverter}" />
						<h:message for="notes" errorClass="error" errorStyle="color: red" infoStyle="color: green"/>

                    </h:panelGrid>
                    <script>
		            	document.getElementById('form:studyName').focus();
		            </script>
                    <br />
					<h:commandButton action="generateStudyDoc" value="#{msg.lblCreate}" />
                       
                </h:form>
            </ui:define>
        </ui:composition>
    </body>
</html>